let mix = require('laravel-mix');

let path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}
/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */
mix.autoload({
  jquery: ['$', 'window.jQuery', 'jQuery'], // more than one
})
mix.extract(['jquery','bootstrap','axios'])
mix.js('resources/assets/js/app.js', 'public/js')
   .js('resources/assets/js/user.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css')
   .sass('resources/assets/sass/user.scss', 'public/css/user.css');
mix.webpackConfig({
  resolve: {
    alias: {
      'assets': resolve('resources/assets'),
      '@': resolve('resources/assets/js')
    }
  }
})

mix.browserSync({
  proxy: 'pycc.com'
})

